package myschool.test2;

import myschool.dao.SubjectDao;
import myschool.entity.Subject;
import myschool.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class SubjectPAg2 {
    public static void main(String[] args) {
        SqlSession s= MyBatisUtil.get();
        SubjectDao mapper = s.getMapper(SubjectDao.class);
        List<Subject> list = mapper.paging2(1, 10);
        for(Subject sb:list){
            System.out.println(sb+"，年级名："+sb.getGname());
        }

        MyBatisUtil.close(s);
    }
}
